package com.bailan.service.impl;

import com.bailan.pojo.Message;
import com.bailan.mapper.MessageMapper;
import com.bailan.service.IMessageService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author BaiLan
 * @since 2022:05:24
 */
@Service
public class MessageServiceImpl extends ServiceImpl<MessageMapper, Message> implements IMessageService {


    @Override
    public String getName(String id) {
        if (baseMapper.getTeacherName(id)!=null){
            return baseMapper.getTeacherName(id);
        }

       return baseMapper.getAdminName(id);
    }

    @Override
    public String getStudentClassId(String studentId) {
       return baseMapper.getStudentClassId(studentId);
    }

    @Override
    public List<String> getTeacherClassId(String teacherId) {

       return baseMapper.getTeacherClassId(teacherId);
    }
}
